<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="/Public/libs/nianhui/css/style.css" />
	<link type="text/css" href="/Public/libs/nianhui/css/wink.css" rel="stylesheet" />
	<link type="text/css" href="/Public/libs/nianhui/css/common.css" rel="stylesheet" />
	<script src="/Public/libs/nianhui/js/islider.js"></script>
	<script src="/Public/libs/nianhui/js/plugins/islider_desktop.js"></script>
	<title></title>
</head>

<body>
	<div class="all">
		<div class="topimg"></div>
		<div class="leftfu"></div>
		<div class="smallfu"></div>
		<div class="bigdl"></div>
		<div class="bigfu"></div>
		<div class="moddledl"></div>
		<div class="smalldl"></div>
		<div class="leftimg"></div>
		<div class="centerimg">
		</div>
		<div class="rightimg"></div>
		<div class="topcenterfont">
			<h1>美丽瞬间</h1>
			<br />
			<h2>拍下最美的一瞬间</h3>
		</div>
		<div id="iSlider-effect-wrapper">
			<div id="animation-effect" class="iSlider-effect"></div>
		</div>


		<!--</div>-->
	</div>
	<div class="control">
		<h1>控制台</h1>
		<div class="btndiv">
			<button>签到</button>
			<button>抽奖</button>
		</div>
		<div class="btndiv">
			<button>摇一摇</button>
			<button>瞬间</button>
		</div>
		<div class="third">
			<span>签到：</span>
			<button>开始</button>
			<button>结束</button>
		</div>
		<div class="third">
			<span>抽奖：</span>
			<button>开始</button>
			<button>结束</button>
		</div>
	</div>
</body>
<script src="/Public/libs/nianhui/js/jquery.min.js"></script>
<!-- goeasy -->
<script type="text/javascript" src="https://cdn-hangzhou.goeasy.io/goeasy.js"></script>

<script>
	$(function () {

		var picList = [{
				width: 1000,
				height: 700,
				content: "/Public/libs/nianhui/images/1.jpg",
			},
			{
				width: 700,
				height: 400,
				content: "/Public/libs/nianhui/images/2.jpg",
			},
			{
				width: 700,
				height: 400,
				content: "/Public/libs/nianhui/images/3.jpg",
			}
		];

		//all animation effect
		var islider1 = new iSlider({
			data: picList,
			dom: document.getElementById("animation-effect"),
			duration: 2000,
			animateType: 'depth',
			isAutoplay: true,
			isLooping: true,
			// isVertical: true, 是否垂直滚动
		});
		islider1.bindMouse();

		// 获取最美瞬间
		$.ajax({
			type: 'POST',
			url: '/admin.php/Active/getuserimg',
			data: {
				time: 666
			},
			success: function (data) {
				if (data['return_code'] == 1) {
					for (var i = 0; i < data['return_body'].length; i++) {

						if (i < picList.length) {
							picList[i]['content'] = 'http://wx.lovepai.ren' + data['return_body'][i]['img_url'];
						} else {
							picList.push({
								width: 700,
								height: 400,
								content: data['return_body'][i]['img_url']
							})
						}

					}
				} else {
					console.log(data['return_code']);
				}

			},
			error: function (err) {

			}
		})








		var goEasy = new GoEasy({
			appkey: 'BS-009cd1c132ff41daa014c5157935997c'
		});
		goEasy.subscribe({
			channel: 'check_user_uploadimg',
			onMessage: function (message) {
				var contentObj = jQuery.parseJSON(message.content);
				picList.push({
					width: 700,
					height: 400,
					content: 'http://wx.lovepai.ren'+contentObj['img_url']
				})
			}
		});
	})
</script>



</html>